<?php

class Social_PostTest extends System_Test_Case
{
    private $_post;
    private $_user;

    public function setUp()
    {
        $this->_post = new Social_Post();
        $this->_user = new Social_User();
        $this->_post->getAdapter()->truncateTable();
    }

    public function tearDown()
    {
    
    }

    public function testAddPost()
    {
        $this->_user->addUser('admin', 'admin', 'admin');
        $sessionKey = $this->_user->login('admin', 'admin');
        $postId = $this->_post->addPost($sessionKey, $title, $content);
        $this->assertTrue($postId, '1');

        $this->_user->addUser('test', 'test', 'guest');
        $sessionKey = $this->_user->login('test', 'test');
        $postId = $this->_post->addPost();
    }
}
